<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>我的电商系统</title>
	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/bootstrap-theme.min.css">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/fornt.css">
</head>
<body id="login">
<div class="container" style="margin-top:50px">
	<div class="col-md-12">
		<h3>列表页 <a href="<?php echo site_url('test_product/add')?>" class="btn btn-success pull-right">添加</a></h3>
		<br>
		<table class="table table-bordered">
			<tr>
				<th class="text-center">标题</th>
				<th class="text-center" width="250px">描述</th>
				<th width="200px" class="text-center">价格</th>
				<th width="200px" class="text-center">操作</th>
			</tr>
			<?php foreach($products as $p){?>
			<tr>
				<td><?php echo $p->title;?></td>
				<td><?php echo $p->desc;?></td>
				<td><?php echo $p->price;?></td>
				<td ><a href="<?php echo site_url('test_product/edit/'.$p->id)?>" class="btn btn-info "> 编辑</a><a href="<?php echo site_url('test_product/del/'.$p->id)?>" class="btn btn-danger" style="margin-left:15px;"> 删除</a></td>
			</tr>
			<?php }?>
		</table>
	</div>
	
</div>
</body>
	<script type="text/javascript" src="<?php echo base_url();?>public/js/jquery.js"></script>
	<script type="text/javascript">
	</script>
</html>